package thesis.javaclass;

import java.io.Serializable;

import thesis.database.Taxi;

public class TempAccept implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private double distance;
	private String numberPlate;
	private String CustomerAddress;

	public TempAccept(String numberPlate, String customerAddress) {
		this.numberPlate = numberPlate;
		CustomerAddress = customerAddress;

		Taxi taxi = SystemModel.getTaxiByNumberPlate(numberPlate).get(0);
		try {
			String taxiPos = MapFunction.getLocation(
					Double.parseDouble(taxi.getNewestLatitude()),
					Double.parseDouble(taxi.getNewestLongitude()));

			distance = MapFunction.getDistance(taxiPos, customerAddress);

			System.out.println(taxiPos);
			System.out.println(customerAddress);
			System.out.println(distance);

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public String getNumberPlate() {
		return numberPlate;
	}

	public void setNumberPlate(String numberPlate) {
		this.numberPlate = numberPlate;
	}

	public String getCustomerAddress() {
		return CustomerAddress;
	}

	public void setCustomerAddress(String customerAddress) {
		CustomerAddress = customerAddress;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

}
